package com.yztc.xiami_app.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by bodhixu on 2016/10/8.
 */
public class DBHelper extends SQLiteOpenHelper{

    public static final String DB_NAME   = "mydb.db";

    public static final int DB_VERSION = 1;

    public DBHelper(Context context) {
        super(context, DB_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        //创建ssq表(省市区3级联动的表)
        sqLiteDatabase.execSQL("CREATE TABLE ssq(_id INTEGER PRIMARY KEY AUTOINCREMENT, pName TEXT, cName TEXT, area TEXT)");
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
